package com.bfly.mall.product.enums;

/**
 * 运费模板运送方式
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/4/27 14:14
 */
public enum ShippingMethodEnum {
    EXPRESS(1, "快递"),
    SELF_MENTION(4, "自提");

    private int id;
    private String name;

    ShippingMethodEnum(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public static ShippingMethodEnum getShippingMethod(int id) {
        for (ShippingMethodEnum status : ShippingMethodEnum.values()) {
            if (id == status.getId()) {
                return status;
            }
        }
        return null;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
